import React from 'react';
import 'antd/dist/antd.css'
import { Button, Input,List } from 'antd'
import './style.css'
const TodolistUi = (props) => {
  let { inputValue, list, inputChange, clickBtn, delEvent } = props

    return (
		<div>
			<div className="wrap">
				<Input
					placeholder=""
					style={{ width: '250px', marginRight: '10px' }}
					value={inputValue}
					onChange={(e) => inputChange(e)}
				/>
				<Button type="primary" onClick={clickBtn}>
					增加
				</Button>
				<div style={{ width: '300px', marginTop: '10px' }}>
					<List
						bordered
						dataSource={list}
						renderItem={(e, i) => (
							<List.Item onClick={() => delEvent(i)}>{e}</List.Item>
						)}
					/>
				</div>
			</div>
		</div>
	)
}

export default TodolistUi
